#include <ros/ros.h>
#include <std_msgs/String.h>

int main(int argc, char** argv)
{
    ros::init(argc, argv, "pub");
    ros::Time::init();
    ros::Rate rate(10);

    ros::NodeHandle nh;
    ros::Publisher pub = nh.advertise<std_msgs::String>("/hello", 10);

    while (ros::ok()) {
        std_msgs::String msg;
        msg.data = "hello ros!";
        pub.publish(msg);
        rate.sleep();
    }

    return 0;
}